package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.Cart;
import com.atguigu.gulimall.cart.vo.CartItem;

import java.util.List;

public interface CartService {
    Cart addToCart(Long skuId, Integer num);

    Cart getCart();

    /**
     * 清空购物车
     * @param cartKey
     * @return
     */
    Cart clearCart(String cartKey);

    /**
     * 获取单个购物项
     * @param skuId
     * @return
     */
    CartItem getCartItem(Long skuId);

    Cart checkItem(Long skuId, Integer check);

    Cart countItem(Long skuId, Integer count);

    Cart deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
